{% extends "administrator/base.html" %}

{% block mainbody %}
<h1>
    编辑会员信息
</h1>
<form id="edit-profile" action="{% url 'admin_users_update' info.id %}" class="form-horizontal" method="post">
        {% csrf_token %}
        <fieldset>
            <legend>编辑会员信息</legend>
            <div class="control-group">
                <label class="control-label" for="input01">账号：</label>
                <div class="controls">
                    <input type="text" name="username" class="input-xlarge" id="input01" value="{{ info.username }}" />
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="input01">真实姓名：</label>
                <div class="controls">
                    <input type="text" name="name" class="input-xlarge" id="input01" value="{{ info.name }}" />
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="input01">性别：</label>
                <div class="controls">
                    <input type="radio" name="sex" class="input-xlarge" id="input01" value="1" {% if info.sex == 1 %}checked{% endif %}/> 男
                    <input type="radio" name="sex" class="input-xlarge" id="input01" value="0" {% if info.sex == 0 %}checked{% endif %}/> 女
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="input01">地址：</label>
                <div class="controls">
                    <input type="text" name="address" class="input-xlarge" id="input01" value="{{ info.address }}"/>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="input01">电话：</label>
                <div class="controls">
                    <input type="text" name="phone" class="input-xlarge" id="input01" value="{{ info.phone }}"/>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="input01">email邮箱：</label>
                <div class="controls">
                    <input type="text" name="email" class="input-xlarge" id="input01" value="{{ info.email }}"/>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="input01">身份：</label>
                <div class="controls">
                    <input type="radio" name="identity" class="input-xlarge" id="input01" value="1" {% if info.identity == 1 %}checked{% endif %}/> 管理员
                    <input type="radio" name="identity" class="input-xlarge" id="input01" value="0" {% if info.sex == 0 %}checked{% endif %}/> 普通用户
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="input01">vip等级：</label>
                <div class="controls">
                    <input type="text" name="viplevel" class="input-xlarge" id="input01" value="{{ info.viplevel }}"/>
                </div>
            </div>                          
            <div class="form-actions">
                <button type="submit" class="btn btn-primary">修改</button> <button type="reset" class="btn">重置</button>
            </div>
        </fieldset>
    </form>

{% endblock %}